<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="button" value="修改message" @click="setM">
    <input type="text" v-model="message" @keyup.enter="getM">
    <h2>{{ message }}</h2>
</div>
<script src="js/vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        data: {
           message:"客服小凯"
        },
        methods:{
            getM:function (){
                alert(this.message)
            },
            setM:function (){
                this.message = "拉丁语"
            }
        },
    })
</script>
</body>
</html>